Quote Originally Posted by Salem View Post
> if (array_to_be_sorted[i] > array_to_be_sorted[i + 1])
Well it seems like this would be an out of bound access once you hit the end of the vector.

Also, pass the vector as a reference rather than by value.
This program has got quite a few problems, actually, I forgot to add a "break" in all switch cases, I wrote incorrectly the bubblesort (this has no excuses, really) and even a few cout statements... it's actually a mess.

Thank you for your suggestion, the program was stuck probably because of what you said, I passed the vector as a value rather than reference.